// Copyright 2021 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.

#ifndef CLAY_UI_EVENT_KEYBOARD_KEY_H_
#define CLAY_UI_EVENT_KEYBOARD_KEY_H_

#include <cstdint>

#include "clay/ui/event/key_codes.h"

namespace clay {

enum class PhysicalKeyboardKey : uint64_t {
  kUnknown = 0,
  kHyper = keycodes::kPhysicalHyper,
  kSuperKey = keycodes::kPhysicalSuperKey,
  kFn = keycodes::kPhysicalFn,
  kFnLock = keycodes::kPhysicalFnLock,
  kSuspend = keycodes::kPhysicalSuspend,
  kResume = keycodes::kPhysicalResume,
  kTurbo = keycodes::kPhysicalTurbo,
  kPrivacyScreenToggle = keycodes::kPhysicalPrivacyScreenToggle,
  kSleep = keycodes::kPhysicalSleep,
  kWakeUp = keycodes::kPhysicalWakeUp,
  kDisplayToggleIntExt = keycodes::kPhysicalDisplayToggleIntExt,
  kGameButton1 = keycodes::kPhysicalGameButton1,
  kGameButton2 = keycodes::kPhysicalGameButton2,
  kGameButton3 = keycodes::kPhysicalGameButton3,
  kGameButton4 = keycodes::kPhysicalGameButton4,
  kGameButton5 = keycodes::kPhysicalGameButton5,
  kGameButton6 = keycodes::kPhysicalGameButton6,
  kGameButton7 = keycodes::kPhysicalGameButton7,
  kGameButton8 = keycodes::kPhysicalGameButton8,
  kGameButton9 = keycodes::kPhysicalGameButton9,
  kGameButton10 = keycodes::kPhysicalGameButton10,
  kGameButton11 = keycodes::kPhysicalGameButton11,
  kGameButton12 = keycodes::kPhysicalGameButton12,
  kGameButton13 = keycodes::kPhysicalGameButton13,
  kGameButton14 = keycodes::kPhysicalGameButton14,
  kGameButton15 = keycodes::kPhysicalGameButton15,
  kGameButton16 = keycodes::kPhysicalGameButton16,
  kGameButtonA = keycodes::kPhysicalGameButtonA,
  kGameButtonB = keycodes::kPhysicalGameButtonB,
  kGameButtonC = keycodes::kPhysicalGameButtonC,
  kGameButtonLeft1 = keycodes::kPhysicalGameButtonLeft1,
  kGameButtonLeft2 = keycodes::kPhysicalGameButtonLeft2,
  kGameButtonMode = keycodes::kPhysicalGameButtonMode,
  kGameButtonRight1 = keycodes::kPhysicalGameButtonRight1,
  kGameButtonRight2 = keycodes::kPhysicalGameButtonRight2,
  kGameButtonSelect = keycodes::kPhysicalGameButtonSelect,
  kGameButtonStart = keycodes::kPhysicalGameButtonStart,
  kGameButtonThumbLeft = keycodes::kPhysicalGameButtonThumbLeft,
  kGameButtonThumbRight = keycodes::kPhysicalGameButtonThumbRight,
  kGameButtonX = keycodes::kPhysicalGameButtonX,
  kGameButtonY = keycodes::kPhysicalGameButtonY,
  kGameButtonZ = keycodes::kPhysicalGameButtonZ,
  kUsbReserved = keycodes::kPhysicalUsbReserved,
  kUsbErrorRollOver = keycodes::kPhysicalUsbErrorRollOver,
  kUsbPostFail = keycodes::kPhysicalUsbPostFail,
  kUsbErrorUndefined = keycodes::kPhysicalUsbErrorUndefined,
  kKeyA = keycodes::kPhysicalKeyA,
  kKeyB = keycodes::kPhysicalKeyB,
  kKeyC = keycodes::kPhysicalKeyC,
  kKeyD = keycodes::kPhysicalKeyD,
  kKeyE = keycodes::kPhysicalKeyE,
  kKeyF = keycodes::kPhysicalKeyF,
  kKeyG = keycodes::kPhysicalKeyG,
  kKeyH = keycodes::kPhysicalKeyH,
  kKeyI = keycodes::kPhysicalKeyI,
  kKeyJ = keycodes::kPhysicalKeyJ,
  kKeyK = keycodes::kPhysicalKeyK,
  kKeyL = keycodes::kPhysicalKeyL,
  kKeyM = keycodes::kPhysicalKeyM,
  kKeyN = keycodes::kPhysicalKeyN,
  kKeyO = keycodes::kPhysicalKeyO,
  kKeyP = keycodes::kPhysicalKeyP,
  kKeyQ = keycodes::kPhysicalKeyQ,
  kKeyR = keycodes::kPhysicalKeyR,
  kKeyS = keycodes::kPhysicalKeyS,
  kKeyT = keycodes::kPhysicalKeyT,
  kKeyU = keycodes::kPhysicalKeyU,
  kKeyV = keycodes::kPhysicalKeyV,
  kKeyW = keycodes::kPhysicalKeyW,
  kKeyX = keycodes::kPhysicalKeyX,
  kKeyY = keycodes::kPhysicalKeyY,
  kKeyZ = keycodes::kPhysicalKeyZ,
  kDigit1 = keycodes::kPhysicalDigit1,
  kDigit2 = keycodes::kPhysicalDigit2,
  kDigit3 = keycodes::kPhysicalDigit3,
  kDigit4 = keycodes::kPhysicalDigit4,
  kDigit5 = keycodes::kPhysicalDigit5,
  kDigit6 = keycodes::kPhysicalDigit6,
  kDigit7 = keycodes::kPhysicalDigit7,
  kDigit8 = keycodes::kPhysicalDigit8,
  kDigit9 = keycodes::kPhysicalDigit9,
  kDigit0 = keycodes::kPhysicalDigit0,
  kEnter = keycodes::kPhysicalEnter,
  kEscape = keycodes::kPhysicalEscape,
  kBackspace = keycodes::kPhysicalBackspace,
  kTab = keycodes::kPhysicalTab,
  kSpace = keycodes::kPhysicalSpace,
  kMinus = keycodes::kPhysicalMinus,
  kEqual = keycodes::kPhysicalEqual,
  kBracketLeft = keycodes::kPhysicalBracketLeft,
  kBracketRight = keycodes::kPhysicalBracketRight,
  kBackslash = keycodes::kPhysicalBackslash,
  kSemicolon = keycodes::kPhysicalSemicolon,
  kQuote = keycodes::kPhysicalQuote,
  kBackquote = keycodes::kPhysicalBackquote,
  kComma = keycodes::kPhysicalComma,
  kPeriod = keycodes::kPhysicalPeriod,
  kSlash = keycodes::kPhysicalSlash,
  kCapsLock = keycodes::kPhysicalCapsLock,
  kF1 = keycodes::kPhysicalF1,
  kF2 = keycodes::kPhysicalF2,
  kF3 = keycodes::kPhysicalF3,
  kF4 = keycodes::kPhysicalF4,
  kF5 = keycodes::kPhysicalF5,
  kF6 = keycodes::kPhysicalF6,
  kF7 = keycodes::kPhysicalF7,
  kF8 = keycodes::kPhysicalF8,
  kF9 = keycodes::kPhysicalF9,
  kF10 = keycodes::kPhysicalF10,
  kF11 = keycodes::kPhysicalF11,
  kF12 = keycodes::kPhysicalF12,
  kPrintScreen = keycodes::kPhysicalPrintScreen,
  kScrollLock = keycodes::kPhysicalScrollLock,
  kPause = keycodes::kPhysicalPause,
  kInsert = keycodes::kPhysicalInsert,
  kHome = keycodes::kPhysicalHome,
  kPageUp = keycodes::kPhysicalPageUp,
  kDelete = keycodes::kPhysicalDelete,
  kEnd = keycodes::kPhysicalEnd,
  kPageDown = keycodes::kPhysicalPageDown,
  kArrowRight = keycodes::kPhysicalArrowRight,
  kArrowLeft = keycodes::kPhysicalArrowLeft,
  kArrowDown = keycodes::kPhysicalArrowDown,
  kArrowUp = keycodes::kPhysicalArrowUp,
  kNumLock = keycodes::kPhysicalNumLock,
  kNumpadDivide = keycodes::kPhysicalNumpadDivide,
  kNumpadMultiply = keycodes::kPhysicalNumpadMultiply,
  kNumpadSubtract = keycodes::kPhysicalNumpadSubtract,
  kNumpadAdd = keycodes::kPhysicalNumpadAdd,
  kNumpadEnter = keycodes::kPhysicalNumpadEnter,
  kNumpad1 = keycodes::kPhysicalNumpad1,
  kNumpad2 = keycodes::kPhysicalNumpad2,
  kNumpad3 = keycodes::kPhysicalNumpad3,
  kNumpad4 = keycodes::kPhysicalNumpad4,
  kNumpad5 = keycodes::kPhysicalNumpad5,
  kNumpad6 = keycodes::kPhysicalNumpad6,
  kNumpad7 = keycodes::kPhysicalNumpad7,
  kNumpad8 = keycodes::kPhysicalNumpad8,
  kNumpad9 = keycodes::kPhysicalNumpad9,
  kNumpad0 = keycodes::kPhysicalNumpad0,
  kNumpadDecimal = keycodes::kPhysicalNumpadDecimal,
  kIntlBackslash = keycodes::kPhysicalIntlBackslash,
  kContextMenu = keycodes::kPhysicalContextMenu,
  kPower = keycodes::kPhysicalPower,
  kNumpadEqual = keycodes::kPhysicalNumpadEqual,
  kF13 = keycodes::kPhysicalF13,
  kF14 = keycodes::kPhysicalF14,
  kF15 = keycodes::kPhysicalF15,
  kF16 = keycodes::kPhysicalF16,
  kF17 = keycodes::kPhysicalF17,
  kF18 = keycodes::kPhysicalF18,
  kF19 = keycodes::kPhysicalF19,
  kF20 = keycodes::kPhysicalF20,
  kF21 = keycodes::kPhysicalF21,
  kF22 = keycodes::kPhysicalF22,
  kF23 = keycodes::kPhysicalF23,
  kF24 = keycodes::kPhysicalF24,
  kOpen = keycodes::kPhysicalOpen,
  kHelp = keycodes::kPhysicalHelp,
  kSelect = keycodes::kPhysicalSelect,
  kAgain = keycodes::kPhysicalAgain,
  kUndo = keycodes::kPhysicalUndo,
  kCut = keycodes::kPhysicalCut,
  kCopy = keycodes::kPhysicalCopy,
  kPaste = keycodes::kPhysicalPaste,
  kFind = keycodes::kPhysicalFind,
  kAudioVolumeMute = keycodes::kPhysicalAudioVolumeMute,
  kAudioVolumeUp = keycodes::kPhysicalAudioVolumeUp,
  kAudioVolumeDown = keycodes::kPhysicalAudioVolumeDown,
  kNumpadComma = keycodes::kPhysicalNumpadComma,
  kIntlRo = keycodes::kPhysicalIntlRo,
  kKanaMode = keycodes::kPhysicalKanaMode,
  kIntlYen = keycodes::kPhysicalIntlYen,
  kConvert = keycodes::kPhysicalConvert,
  kNonConvert = keycodes::kPhysicalNonConvert,
  kLang1 = keycodes::kPhysicalLang1,
  kLang2 = keycodes::kPhysicalLang2,
  kLang3 = keycodes::kPhysicalLang3,
  kLang4 = keycodes::kPhysicalLang4,
  kLang5 = keycodes::kPhysicalLang5,
  kAbort = keycodes::kPhysicalAbort,
  kProps = keycodes::kPhysicalProps,
  kNumpadParenLeft = keycodes::kPhysicalNumpadParenLeft,
  kNumpadParenRight = keycodes::kPhysicalNumpadParenRight,
  kNumpadBackspace = keycodes::kPhysicalNumpadBackspace,
  kNumpadMemoryStore = keycodes::kPhysicalNumpadMemoryStore,
  kNumpadMemoryRecall = keycodes::kPhysicalNumpadMemoryRecall,
  kNumpadMemoryClear = keycodes::kPhysicalNumpadMemoryClear,
  kNumpadMemoryAdd = keycodes::kPhysicalNumpadMemoryAdd,
  kNumpadMemorySubtract = keycodes::kPhysicalNumpadMemorySubtract,
  kNumpadSignChange = keycodes::kPhysicalNumpadSignChange,
  kNumpadClear = keycodes::kPhysicalNumpadClear,
  kNumpadClearEntry = keycodes::kPhysicalNumpadClearEntry,
  kControlLeft = keycodes::kPhysicalControlLeft,
  kShiftLeft = keycodes::kPhysicalShiftLeft,
  kAltLeft = keycodes::kPhysicalAltLeft,
  kMetaLeft = keycodes::kPhysicalMetaLeft,
  kControlRight = keycodes::kPhysicalControlRight,
  kShiftRight = keycodes::kPhysicalShiftRight,
  kAltRight = keycodes::kPhysicalAltRight,
  kMetaRight = keycodes::kPhysicalMetaRight,
  kInfo = keycodes::kPhysicalInfo,
  kClosedCaptionToggle = keycodes::kPhysicalClosedCaptionToggle,
  kBrightnessUp = keycodes::kPhysicalBrightnessUp,
  kBrightnessDown = keycodes::kPhysicalBrightnessDown,
  kBrightnessToggle = keycodes::kPhysicalBrightnessToggle,
  kBrightnessMinimum = keycodes::kPhysicalBrightnessMinimum,
  kBrightnessMaximum = keycodes::kPhysicalBrightnessMaximum,
  kBrightnessAuto = keycodes::kPhysicalBrightnessAuto,
  kKbdIllumUp = keycodes::kPhysicalKbdIllumUp,
  kKbdIllumDown = keycodes::kPhysicalKbdIllumDown,
  kMediaLast = keycodes::kPhysicalMediaLast,
  kLaunchPhone = keycodes::kPhysicalLaunchPhone,
  kProgramGuide = keycodes::kPhysicalProgramGuide,
  kExit = keycodes::kPhysicalExit,
  kChannelUp = keycodes::kPhysicalChannelUp,
  kChannelDown = keycodes::kPhysicalChannelDown,
  kMediaPlay = keycodes::kPhysicalMediaPlay,
  kMediaPause = keycodes::kPhysicalMediaPause,
  kMediaRecord = keycodes::kPhysicalMediaRecord,
  kMediaFastForward = keycodes::kPhysicalMediaFastForward,
  kMediaRewind = keycodes::kPhysicalMediaRewind,
  kMediaTrackNext = keycodes::kPhysicalMediaTrackNext,
  kMediaTrackPrevious = keycodes::kPhysicalMediaTrackPrevious,
  kMediaStop = keycodes::kPhysicalMediaStop,
  kEject = keycodes::kPhysicalEject,
  kMediaPlayPause = keycodes::kPhysicalMediaPlayPause,
  kSpeechInputToggle = keycodes::kPhysicalSpeechInputToggle,
  kBassBoost = keycodes::kPhysicalBassBoost,
  kMediaSelect = keycodes::kPhysicalMediaSelect,
  kLaunchWordProcessor = keycodes::kPhysicalLaunchWordProcessor,
  kLaunchSpreadsheet = keycodes::kPhysicalLaunchSpreadsheet,
  kLaunchMail = keycodes::kPhysicalLaunchMail,
  kLaunchContacts = keycodes::kPhysicalLaunchContacts,
  kLaunchCalendar = keycodes::kPhysicalLaunchCalendar,
  kLaunchApp2 = keycodes::kPhysicalLaunchApp2,
  kLaunchApp1 = keycodes::kPhysicalLaunchApp1,
  kLaunchInternetBrowser = keycodes::kPhysicalLaunchInternetBrowser,
  kLogOff = keycodes::kPhysicalLogOff,
  kLockScreen = keycodes::kPhysicalLockScreen,
  kLaunchControlPanel = keycodes::kPhysicalLaunchControlPanel,
  kSelectTask = keycodes::kPhysicalSelectTask,
  kLaunchDocuments = keycodes::kPhysicalLaunchDocuments,
  kSpellCheck = keycodes::kPhysicalSpellCheck,
  kLaunchKeyboardLayout = keycodes::kPhysicalLaunchKeyboardLayout,
  kLaunchScreenSaver = keycodes::kPhysicalLaunchScreenSaver,
  kLaunchAudioBrowser = keycodes::kPhysicalLaunchAudioBrowser,
  kLaunchAssistant = keycodes::kPhysicalLaunchAssistant,
  kNewKey = keycodes::kPhysicalNewKey,
  kClose = keycodes::kPhysicalClose,
  kSave = keycodes::kPhysicalSave,
  kPrint = keycodes::kPhysicalPrint,
  kBrowserSearch = keycodes::kPhysicalBrowserSearch,
  kBrowserHome = keycodes::kPhysicalBrowserHome,
  kBrowserBack = keycodes::kPhysicalBrowserBack,
  kBrowserForward = keycodes::kPhysicalBrowserForward,
  kBrowserStop = keycodes::kPhysicalBrowserStop,
  kBrowserRefresh = keycodes::kPhysicalBrowserRefresh,
  kBrowserFavorites = keycodes::kPhysicalBrowserFavorites,
  kZoomIn = keycodes::kPhysicalZoomIn,
  kZoomOut = keycodes::kPhysicalZoomOut,
  kZoomToggle = keycodes::kPhysicalZoomToggle,
  kRedo = keycodes::kPhysicalRedo,
  kMailReply = keycodes::kPhysicalMailReply,
  kMailForward = keycodes::kPhysicalMailForward,
  kMailSend = keycodes::kPhysicalMailSend,
  kKeyboardLayoutSelect = keycodes::kPhysicalKeyboardLayoutSelect,
  kShowAllWindows = keycodes::kPhysicalShowAllWindows,
};

enum class LogicalKeyboardKey : uint64_t {
  kUnknown = 0,
  kSpace = keycodes::kLogicalSpace,
  kExclamation = keycodes::kLogicalExclamation,
  kQuote = keycodes::kLogicalQuote,
  kNumberSign = keycodes::kLogicalNumberSign,
  kDollar = keycodes::kLogicalDollar,
  kPercent = keycodes::kLogicalPercent,
  kAmpersand = keycodes::kLogicalAmpersand,
  kQuoteSingle = keycodes::kLogicalQuoteSingle,
  kParenthesisLeft = keycodes::kLogicalParenthesisLeft,
  kParenthesisRight = keycodes::kLogicalParenthesisRight,
  kAsterisk = keycodes::kLogicalAsterisk,
  kAdd = keycodes::kLogicalAdd,
  kComma = keycodes::kLogicalComma,
  kMinus = keycodes::kLogicalMinus,
  kPeriod = keycodes::kLogicalPeriod,
  kSlash = keycodes::kLogicalSlash,
  kDigit0 = keycodes::kLogicalDigit0,
  kDigit1 = keycodes::kLogicalDigit1,
  kDigit2 = keycodes::kLogicalDigit2,
  kDigit3 = keycodes::kLogicalDigit3,
  kDigit4 = keycodes::kLogicalDigit4,
  kDigit5 = keycodes::kLogicalDigit5,
  kDigit6 = keycodes::kLogicalDigit6,
  kDigit7 = keycodes::kLogicalDigit7,
  kDigit8 = keycodes::kLogicalDigit8,
  kDigit9 = keycodes::kLogicalDigit9,
  kColon = keycodes::kLogicalColon,
  kSemicolon = keycodes::kLogicalSemicolon,
  kLess = keycodes::kLogicalLess,
  kEqual = keycodes::kLogicalEqual,
  kGreater = keycodes::kLogicalGreater,
  kQuestion = keycodes::kLogicalQuestion,
  kAt = keycodes::kLogicalAt,
  kBracketLeft = keycodes::kLogicalBracketLeft,
  kBackslash = keycodes::kLogicalBackslash,
  kBracketRight = keycodes::kLogicalBracketRight,
  kCaret = keycodes::kLogicalCaret,
  kUnderscore = keycodes::kLogicalUnderscore,
  kBackquote = keycodes::kLogicalBackquote,
  kKeyA = keycodes::kLogicalKeyA,
  kKeyB = keycodes::kLogicalKeyB,
  kKeyC = keycodes::kLogicalKeyC,
  kKeyD = keycodes::kLogicalKeyD,
  kKeyE = keycodes::kLogicalKeyE,
  kKeyF = keycodes::kLogicalKeyF,
  kKeyG = keycodes::kLogicalKeyG,
  kKeyH = keycodes::kLogicalKeyH,
  kKeyI = keycodes::kLogicalKeyI,
  kKeyJ = keycodes::kLogicalKeyJ,
  kKeyK = keycodes::kLogicalKeyK,
  kKeyL = keycodes::kLogicalKeyL,
  kKeyM = keycodes::kLogicalKeyM,
  kKeyN = keycodes::kLogicalKeyN,
  kKeyO = keycodes::kLogicalKeyO,
  kKeyP = keycodes::kLogicalKeyP,
  kKeyQ = keycodes::kLogicalKeyQ,
  kKeyR = keycodes::kLogicalKeyR,
  kKeyS = keycodes::kLogicalKeyS,
  kKeyT = keycodes::kLogicalKeyT,
  kKeyU = keycodes::kLogicalKeyU,
  kKeyV = keycodes::kLogicalKeyV,
  kKeyW = keycodes::kLogicalKeyW,
  kKeyX = keycodes::kLogicalKeyX,
  kKeyY = keycodes::kLogicalKeyY,
  kKeyZ = keycodes::kLogicalKeyZ,
  kBraceLeft = keycodes::kLogicalBraceLeft,
  kBar = keycodes::kLogicalBar,
  kBraceRight = keycodes::kLogicalBraceRight,
  kTilde = keycodes::kLogicalTilde,
  kUnidentified = keycodes::kLogicalUnidentified,
  kBackspace = keycodes::kLogicalBackspace,
  kTab = keycodes::kLogicalTab,
  kEnter = keycodes::kLogicalEnter,
  kEscape = keycodes::kLogicalEscape,
  kDelete = keycodes::kLogicalDelete,
  kAccel = keycodes::kLogicalAccel,
  kAltGraph = keycodes::kLogicalAltGraph,
  kCapsLock = keycodes::kLogicalCapsLock,
  kFn = keycodes::kLogicalFn,
  kFnLock = keycodes::kLogicalFnLock,
  kHyper = keycodes::kLogicalHyper,
  kNumLock = keycodes::kLogicalNumLock,
  kScrollLock = keycodes::kLogicalScrollLock,
  kSuperKey = keycodes::kLogicalSuperKey,
  kSymbol = keycodes::kLogicalSymbol,
  kSymbolLock = keycodes::kLogicalSymbolLock,
  kShiftLevel5 = keycodes::kLogicalShiftLevel5,
  kArrowDown = keycodes::kLogicalArrowDown,
  kArrowLeft = keycodes::kLogicalArrowLeft,
  kArrowRight = keycodes::kLogicalArrowRight,
  kArrowUp = keycodes::kLogicalArrowUp,
  kEnd = keycodes::kLogicalEnd,
  kHome = keycodes::kLogicalHome,
  kPageDown = keycodes::kLogicalPageDown,
  kPageUp = keycodes::kLogicalPageUp,
  kClear = keycodes::kLogicalClear,
  kCopy = keycodes::kLogicalCopy,
  kCrSel = keycodes::kLogicalCrSel,
  kCut = keycodes::kLogicalCut,
  kEraseEof = keycodes::kLogicalEraseEof,
  kExSel = keycodes::kLogicalExSel,
  kInsert = keycodes::kLogicalInsert,
  kPaste = keycodes::kLogicalPaste,
  kRedo = keycodes::kLogicalRedo,
  kUndo = keycodes::kLogicalUndo,
  kAccept = keycodes::kLogicalAccept,
  kAgain = keycodes::kLogicalAgain,
  kAttn = keycodes::kLogicalAttn,
  kCancel = keycodes::kLogicalCancel,
  kContextMenu = keycodes::kLogicalContextMenu,
  kExecute = keycodes::kLogicalExecute,
  kFind = keycodes::kLogicalFind,
  kHelp = keycodes::kLogicalHelp,
  kPause = keycodes::kLogicalPause,
  kPlay = keycodes::kLogicalPlay,
  kProps = keycodes::kLogicalProps,
  kSelect = keycodes::kLogicalSelect,
  kZoomIn = keycodes::kLogicalZoomIn,
  kZoomOut = keycodes::kLogicalZoomOut,
  kBrightnessDown = keycodes::kLogicalBrightnessDown,
  kBrightnessUp = keycodes::kLogicalBrightnessUp,
  kCamera = keycodes::kLogicalCamera,
  kEject = keycodes::kLogicalEject,
  kLogOff = keycodes::kLogicalLogOff,
  kPower = keycodes::kLogicalPower,
  kPowerOff = keycodes::kLogicalPowerOff,
  kPrintScreen = keycodes::kLogicalPrintScreen,
  kHibernate = keycodes::kLogicalHibernate,
  kStandby = keycodes::kLogicalStandby,
  kWakeUp = keycodes::kLogicalWakeUp,
  kAllCandidates = keycodes::kLogicalAllCandidates,
  kAlphanumeric = keycodes::kLogicalAlphanumeric,
  kCodeInput = keycodes::kLogicalCodeInput,
  kCompose = keycodes::kLogicalCompose,
  kConvert = keycodes::kLogicalConvert,
  kFinalMode = keycodes::kLogicalFinalMode,
  kGroupFirst = keycodes::kLogicalGroupFirst,
  kGroupLast = keycodes::kLogicalGroupLast,
  kGroupNext = keycodes::kLogicalGroupNext,
  kGroupPrevious = keycodes::kLogicalGroupPrevious,
  kModeChange = keycodes::kLogicalModeChange,
  kNextCandidate = keycodes::kLogicalNextCandidate,
  kNonConvert = keycodes::kLogicalNonConvert,
  kPreviousCandidate = keycodes::kLogicalPreviousCandidate,
  kProcess = keycodes::kLogicalProcess,
  kSingleCandidate = keycodes::kLogicalSingleCandidate,
  kHangulMode = keycodes::kLogicalHangulMode,
  kHanjaMode = keycodes::kLogicalHanjaMode,
  kJunjaMode = keycodes::kLogicalJunjaMode,
  kEisu = keycodes::kLogicalEisu,
  kHankaku = keycodes::kLogicalHankaku,
  kHiragana = keycodes::kLogicalHiragana,
  kHiraganaKatakana = keycodes::kLogicalHiraganaKatakana,
  kKanaMode = keycodes::kLogicalKanaMode,
  kKanjiMode = keycodes::kLogicalKanjiMode,
  kKatakana = keycodes::kLogicalKatakana,
  kRomaji = keycodes::kLogicalRomaji,
  kZenkaku = keycodes::kLogicalZenkaku,
  kZenkakuHankaku = keycodes::kLogicalZenkakuHankaku,
  kF1 = keycodes::kLogicalF1,
  kF2 = keycodes::kLogicalF2,
  kF3 = keycodes::kLogicalF3,
  kF4 = keycodes::kLogicalF4,
  kF5 = keycodes::kLogicalF5,
  kF6 = keycodes::kLogicalF6,
  kF7 = keycodes::kLogicalF7,
  kF8 = keycodes::kLogicalF8,
  kF9 = keycodes::kLogicalF9,
  kF10 = keycodes::kLogicalF10,
  kF11 = keycodes::kLogicalF11,
  kF12 = keycodes::kLogicalF12,
  kF13 = keycodes::kLogicalF13,
  kF14 = keycodes::kLogicalF14,
  kF15 = keycodes::kLogicalF15,
  kF16 = keycodes::kLogicalF16,
  kF17 = keycodes::kLogicalF17,
  kF18 = keycodes::kLogicalF18,
  kF19 = keycodes::kLogicalF19,
  kF20 = keycodes::kLogicalF20,
  kF21 = keycodes::kLogicalF21,
  kF22 = keycodes::kLogicalF22,
  kF23 = keycodes::kLogicalF23,
  kF24 = keycodes::kLogicalF24,
  kSoft1 = keycodes::kLogicalSoft1,
  kSoft2 = keycodes::kLogicalSoft2,
  kSoft3 = keycodes::kLogicalSoft3,
  kSoft4 = keycodes::kLogicalSoft4,
  kSoft5 = keycodes::kLogicalSoft5,
  kSoft6 = keycodes::kLogicalSoft6,
  kSoft7 = keycodes::kLogicalSoft7,
  kSoft8 = keycodes::kLogicalSoft8,
  kClose = keycodes::kLogicalClose,
  kMailForward = keycodes::kLogicalMailForward,
  kMailReply = keycodes::kLogicalMailReply,
  kMailSend = keycodes::kLogicalMailSend,
  kMediaPlayPause = keycodes::kLogicalMediaPlayPause,
  kMediaStop = keycodes::kLogicalMediaStop,
  kMediaTrackNext = keycodes::kLogicalMediaTrackNext,
  kMediaTrackPrevious = keycodes::kLogicalMediaTrackPrevious,
  kNewKey = keycodes::kLogicalNewKey,
  kOpen = keycodes::kLogicalOpen,
  kPrint = keycodes::kLogicalPrint,
  kSave = keycodes::kLogicalSave,
  kSpellCheck = keycodes::kLogicalSpellCheck,
  kAudioVolumeDown = keycodes::kLogicalAudioVolumeDown,
  kAudioVolumeUp = keycodes::kLogicalAudioVolumeUp,
  kAudioVolumeMute = keycodes::kLogicalAudioVolumeMute,
  kLaunchApplication2 = keycodes::kLogicalLaunchApplication2,
  kLaunchCalendar = keycodes::kLogicalLaunchCalendar,
  kLaunchMail = keycodes::kLogicalLaunchMail,
  kLaunchMediaPlayer = keycodes::kLogicalLaunchMediaPlayer,
  kLaunchMusicPlayer = keycodes::kLogicalLaunchMusicPlayer,
  kLaunchApplication1 = keycodes::kLogicalLaunchApplication1,
  kLaunchScreenSaver = keycodes::kLogicalLaunchScreenSaver,
  kLaunchSpreadsheet = keycodes::kLogicalLaunchSpreadsheet,
  kLaunchWebBrowser = keycodes::kLogicalLaunchWebBrowser,
  kLaunchWebCam = keycodes::kLogicalLaunchWebCam,
  kLaunchWordProcessor = keycodes::kLogicalLaunchWordProcessor,
  kLaunchContacts = keycodes::kLogicalLaunchContacts,
  kLaunchPhone = keycodes::kLogicalLaunchPhone,
  kLaunchAssistant = keycodes::kLogicalLaunchAssistant,
  kLaunchControlPanel = keycodes::kLogicalLaunchControlPanel,
  kBrowserBack = keycodes::kLogicalBrowserBack,
  kBrowserFavorites = keycodes::kLogicalBrowserFavorites,
  kBrowserForward = keycodes::kLogicalBrowserForward,
  kBrowserHome = keycodes::kLogicalBrowserHome,
  kBrowserRefresh = keycodes::kLogicalBrowserRefresh,
  kBrowserSearch = keycodes::kLogicalBrowserSearch,
  kBrowserStop = keycodes::kLogicalBrowserStop,
  kAudioBalanceLeft = keycodes::kLogicalAudioBalanceLeft,
  kAudioBalanceRight = keycodes::kLogicalAudioBalanceRight,
  kAudioBassBoostDown = keycodes::kLogicalAudioBassBoostDown,
  kAudioBassBoostUp = keycodes::kLogicalAudioBassBoostUp,
  kAudioFaderFront = keycodes::kLogicalAudioFaderFront,
  kAudioFaderRear = keycodes::kLogicalAudioFaderRear,
  kAudioSurroundModeNext = keycodes::kLogicalAudioSurroundModeNext,
  kAvrInput = keycodes::kLogicalAvrInput,
  kAvrPower = keycodes::kLogicalAvrPower,
  kChannelDown = keycodes::kLogicalChannelDown,
  kChannelUp = keycodes::kLogicalChannelUp,
  kColorF0Red = keycodes::kLogicalColorF0Red,
  kColorF1Green = keycodes::kLogicalColorF1Green,
  kColorF2Yellow = keycodes::kLogicalColorF2Yellow,
  kColorF3Blue = keycodes::kLogicalColorF3Blue,
  kColorF4Grey = keycodes::kLogicalColorF4Grey,
  kColorF5Brown = keycodes::kLogicalColorF5Brown,
  kClosedCaptionToggle = keycodes::kLogicalClosedCaptionToggle,
  kDimmer = keycodes::kLogicalDimmer,
  kDisplaySwap = keycodes::kLogicalDisplaySwap,
  kExit = keycodes::kLogicalExit,
  kFavoriteClear0 = keycodes::kLogicalFavoriteClear0,
  kFavoriteClear1 = keycodes::kLogicalFavoriteClear1,
  kFavoriteClear2 = keycodes::kLogicalFavoriteClear2,
  kFavoriteClear3 = keycodes::kLogicalFavoriteClear3,
  kFavoriteRecall0 = keycodes::kLogicalFavoriteRecall0,
  kFavoriteRecall1 = keycodes::kLogicalFavoriteRecall1,
  kFavoriteRecall2 = keycodes::kLogicalFavoriteRecall2,
  kFavoriteRecall3 = keycodes::kLogicalFavoriteRecall3,
  kFavoriteStore0 = keycodes::kLogicalFavoriteStore0,
  kFavoriteStore1 = keycodes::kLogicalFavoriteStore1,
  kFavoriteStore2 = keycodes::kLogicalFavoriteStore2,
  kFavoriteStore3 = keycodes::kLogicalFavoriteStore3,
  kGuide = keycodes::kLogicalGuide,
  kGuideNextDay = keycodes::kLogicalGuideNextDay,
  kGuidePreviousDay = keycodes::kLogicalGuidePreviousDay,
  kInfo = keycodes::kLogicalInfo,
  kInstantReplay = keycodes::kLogicalInstantReplay,
  kLink = keycodes::kLogicalLink,
  kListProgram = keycodes::kLogicalListProgram,
  kLiveContent = keycodes::kLogicalLiveContent,
  kLock = keycodes::kLogicalLock,
  kMediaApps = keycodes::kLogicalMediaApps,
  kMediaFastForward = keycodes::kLogicalMediaFastForward,
  kMediaLast = keycodes::kLogicalMediaLast,
  kMediaPause = keycodes::kLogicalMediaPause,
  kMediaPlay = keycodes::kLogicalMediaPlay,
  kMediaRecord = keycodes::kLogicalMediaRecord,
  kMediaRewind = keycodes::kLogicalMediaRewind,
  kMediaSkip = keycodes::kLogicalMediaSkip,
  kNextFavoriteChannel = keycodes::kLogicalNextFavoriteChannel,
  kNextUserProfile = keycodes::kLogicalNextUserProfile,
  kOnDemand = keycodes::kLogicalOnDemand,
  kPInPDown = keycodes::kLogicalPInPDown,
  kPInPMove = keycodes::kLogicalPInPMove,
  kPInPToggle = keycodes::kLogicalPInPToggle,
  kPInPUp = keycodes::kLogicalPInPUp,
  kPlaySpeedDown = keycodes::kLogicalPlaySpeedDown,
  kPlaySpeedReset = keycodes::kLogicalPlaySpeedReset,
  kPlaySpeedUp = keycodes::kLogicalPlaySpeedUp,
  kRandomToggle = keycodes::kLogicalRandomToggle,
  kRcLowBattery = keycodes::kLogicalRcLowBattery,
  kRecordSpeedNext = keycodes::kLogicalRecordSpeedNext,
  kRfBypass = keycodes::kLogicalRfBypass,
  kScanChannelsToggle = keycodes::kLogicalScanChannelsToggle,
  kScreenModeNext = keycodes::kLogicalScreenModeNext,
  kSettings = keycodes::kLogicalSettings,
  kSplitScreenToggle = keycodes::kLogicalSplitScreenToggle,
  kStbInput = keycodes::kLogicalStbInput,
  kStbPower = keycodes::kLogicalStbPower,
  kSubtitle = keycodes::kLogicalSubtitle,
  kTeletext = keycodes::kLogicalTeletext,
  kTv = keycodes::kLogicalTv,
  kTvInput = keycodes::kLogicalTvInput,
  kTvPower = keycodes::kLogicalTvPower,
  kVideoModeNext = keycodes::kLogicalVideoModeNext,
  kWink = keycodes::kLogicalWink,
  kZoomToggle = keycodes::kLogicalZoomToggle,
  kDvr = keycodes::kLogicalDvr,
  kMediaAudioTrack = keycodes::kLogicalMediaAudioTrack,
  kMediaSkipBackward = keycodes::kLogicalMediaSkipBackward,
  kMediaSkipForward = keycodes::kLogicalMediaSkipForward,
  kMediaStepBackward = keycodes::kLogicalMediaStepBackward,
  kMediaStepForward = keycodes::kLogicalMediaStepForward,
  kMediaTopMenu = keycodes::kLogicalMediaTopMenu,
  kNavigateIn = keycodes::kLogicalNavigateIn,
  kNavigateNext = keycodes::kLogicalNavigateNext,
  kNavigateOut = keycodes::kLogicalNavigateOut,
  kNavigatePrevious = keycodes::kLogicalNavigatePrevious,
  kPairing = keycodes::kLogicalPairing,
  kMediaClose = keycodes::kLogicalMediaClose,
  kAudioBassBoostToggle = keycodes::kLogicalAudioBassBoostToggle,
  kAudioTrebleDown = keycodes::kLogicalAudioTrebleDown,
  kAudioTrebleUp = keycodes::kLogicalAudioTrebleUp,
  kMicrophoneToggle = keycodes::kLogicalMicrophoneToggle,
  kMicrophoneVolumeDown = keycodes::kLogicalMicrophoneVolumeDown,
  kMicrophoneVolumeUp = keycodes::kLogicalMicrophoneVolumeUp,
  kMicrophoneVolumeMute = keycodes::kLogicalMicrophoneVolumeMute,
  kSpeechCorrectionList = keycodes::kLogicalSpeechCorrectionList,
  kSpeechInputToggle = keycodes::kLogicalSpeechInputToggle,
  kAppSwitch = keycodes::kLogicalAppSwitch,
  kCall = keycodes::kLogicalCall,
  kCameraFocus = keycodes::kLogicalCameraFocus,
  kEndCall = keycodes::kLogicalEndCall,
  kGoBack = keycodes::kLogicalGoBack,
  kGoHome = keycodes::kLogicalGoHome,
  kHeadsetHook = keycodes::kLogicalHeadsetHook,
  kLastNumberRedial = keycodes::kLogicalLastNumberRedial,
  kNotification = keycodes::kLogicalNotification,
  kMannerMode = keycodes::kLogicalMannerMode,
  kVoiceDial = keycodes::kLogicalVoiceDial,
  kTv3DMode = keycodes::kLogicalTv3DMode,
  kTvAntennaCable = keycodes::kLogicalTvAntennaCable,
  kTvAudioDescription = keycodes::kLogicalTvAudioDescription,
  kTvAudioDescriptionMixDown = keycodes::kLogicalTvAudioDescriptionMixDown,
  kTvAudioDescriptionMixUp = keycodes::kLogicalTvAudioDescriptionMixUp,
  kTvContentsMenu = keycodes::kLogicalTvContentsMenu,
  kTvDataService = keycodes::kLogicalTvDataService,
  kTvInputComponent1 = keycodes::kLogicalTvInputComponent1,
  kTvInputComponent2 = keycodes::kLogicalTvInputComponent2,
  kTvInputComposite1 = keycodes::kLogicalTvInputComposite1,
  kTvInputComposite2 = keycodes::kLogicalTvInputComposite2,
  kTvInputHDMI1 = keycodes::kLogicalTvInputHDMI1,
  kTvInputHDMI2 = keycodes::kLogicalTvInputHDMI2,
  kTvInputHDMI3 = keycodes::kLogicalTvInputHDMI3,
  kTvInputHDMI4 = keycodes::kLogicalTvInputHDMI4,
  kTvInputVGA1 = keycodes::kLogicalTvInputVGA1,
  kTvMediaContext = keycodes::kLogicalTvMediaContext,
  kTvNetwork = keycodes::kLogicalTvNetwork,
  kTvNumberEntry = keycodes::kLogicalTvNumberEntry,
  kTvRadioService = keycodes::kLogicalTvRadioService,
  kTvSatellite = keycodes::kLogicalTvSatellite,
  kTvSatelliteBS = keycodes::kLogicalTvSatelliteBS,
  kTvSatelliteCS = keycodes::kLogicalTvSatelliteCS,
  kTvSatelliteToggle = keycodes::kLogicalTvSatelliteToggle,
  kTvTerrestrialAnalog = keycodes::kLogicalTvTerrestrialAnalog,
  kTvTerrestrialDigital = keycodes::kLogicalTvTerrestrialDigital,
  kTvTimer = keycodes::kLogicalTvTimer,
  kKey11 = keycodes::kLogicalKey11,
  kKey12 = keycodes::kLogicalKey12,
  kSuspend = keycodes::kLogicalSuspend,
  kResume = keycodes::kLogicalResume,
  kSleep = keycodes::kLogicalSleep,
  kAbort = keycodes::kLogicalAbort,
  kLang1 = keycodes::kLogicalLang1,
  kLang2 = keycodes::kLogicalLang2,
  kLang3 = keycodes::kLogicalLang3,
  kLang4 = keycodes::kLogicalLang4,
  kLang5 = keycodes::kLogicalLang5,
  kIntlBackslash = keycodes::kLogicalIntlBackslash,
  kIntlRo = keycodes::kLogicalIntlRo,
  kIntlYen = keycodes::kLogicalIntlYen,
  kControlLeft = keycodes::kLogicalControlLeft,
  kControlRight = keycodes::kLogicalControlRight,
  kShiftLeft = keycodes::kLogicalShiftLeft,
  kShiftRight = keycodes::kLogicalShiftRight,
  kAltLeft = keycodes::kLogicalAltLeft,
  kAltRight = keycodes::kLogicalAltRight,
  kMetaLeft = keycodes::kLogicalMetaLeft,
  kMetaRight = keycodes::kLogicalMetaRight,
  kControl = keycodes::kLogicalControl,
  kShift = keycodes::kLogicalShift,
  kAlt = keycodes::kLogicalAlt,
  kMeta = keycodes::kLogicalMeta,
  kNumpadEnter = keycodes::kLogicalNumpadEnter,
  kNumpadParenLeft = keycodes::kLogicalNumpadParenLeft,
  kNumpadParenRight = keycodes::kLogicalNumpadParenRight,
  kNumpadMultiply = keycodes::kLogicalNumpadMultiply,
  kNumpadAdd = keycodes::kLogicalNumpadAdd,
  kNumpadComma = keycodes::kLogicalNumpadComma,
  kNumpadSubtract = keycodes::kLogicalNumpadSubtract,
  kNumpadDecimal = keycodes::kLogicalNumpadDecimal,
  kNumpadDivide = keycodes::kLogicalNumpadDivide,
  kNumpad0 = keycodes::kLogicalNumpad0,
  kNumpad1 = keycodes::kLogicalNumpad1,
  kNumpad2 = keycodes::kLogicalNumpad2,
  kNumpad3 = keycodes::kLogicalNumpad3,
  kNumpad4 = keycodes::kLogicalNumpad4,
  kNumpad5 = keycodes::kLogicalNumpad5,
  kNumpad6 = keycodes::kLogicalNumpad6,
  kNumpad7 = keycodes::kLogicalNumpad7,
  kNumpad8 = keycodes::kLogicalNumpad8,
  kNumpad9 = keycodes::kLogicalNumpad9,
  kNumpadEqual = keycodes::kLogicalNumpadEqual,
  kGameButton1 = keycodes::kLogicalGameButton1,
  kGameButton2 = keycodes::kLogicalGameButton2,
  kGameButton3 = keycodes::kLogicalGameButton3,
  kGameButton4 = keycodes::kLogicalGameButton4,
  kGameButton5 = keycodes::kLogicalGameButton5,
  kGameButton6 = keycodes::kLogicalGameButton6,
  kGameButton7 = keycodes::kLogicalGameButton7,
  kGameButton8 = keycodes::kLogicalGameButton8,
  kGameButton9 = keycodes::kLogicalGameButton9,
  kGameButton10 = keycodes::kLogicalGameButton10,
  kGameButton11 = keycodes::kLogicalGameButton11,
  kGameButton12 = keycodes::kLogicalGameButton12,
  kGameButton13 = keycodes::kLogicalGameButton13,
  kGameButton14 = keycodes::kLogicalGameButton14,
  kGameButton15 = keycodes::kLogicalGameButton15,
  kGameButton16 = keycodes::kLogicalGameButton16,
  kGameButtonA = keycodes::kLogicalGameButtonA,
  kGameButtonB = keycodes::kLogicalGameButtonB,
  kGameButtonC = keycodes::kLogicalGameButtonC,
  kGameButtonLeft1 = keycodes::kLogicalGameButtonLeft1,
  kGameButtonLeft2 = keycodes::kLogicalGameButtonLeft2,
  kGameButtonMode = keycodes::kLogicalGameButtonMode,
  kGameButtonRight1 = keycodes::kLogicalGameButtonRight1,
  kGameButtonRight2 = keycodes::kLogicalGameButtonRight2,
  kGameButtonSelect = keycodes::kLogicalGameButtonSelect,
  kGameButtonStart = keycodes::kLogicalGameButtonStart,
  kGameButtonThumbLeft = keycodes::kLogicalGameButtonThumbLeft,
  kGameButtonThumbRight = keycodes::kLogicalGameButtonThumbRight,
  kGameButtonX = keycodes::kLogicalGameButtonX,
  kGameButtonY = keycodes::kLogicalGameButtonY,
  kGameButtonZ = keycodes::kLogicalGameButtonZ,
};

using KeyCode = LogicalKeyboardKey;

inline bool IsBackOrEscapeKey(KeyCode key_code) {
  return key_code == LogicalKeyboardKey::kGoBack ||
         key_code == LogicalKeyboardKey::kEscape;
}

}  // namespace clay
#endif  // CLAY_UI_EVENT_KEYBOARD_KEY_H_
